﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace RedfieldWeather.Controls
{
	public partial class Rain : System.Web.UI.UserControl
	{
		public void SetCurrentConditions(RFW.Weather.CurrentConditions cc)
		{
			lblDaily.Text = string.Format("{0:N2} in", cc.Rain.Daily);
			lblRate.Text = string.Format("{0:N2} in/hour", cc.Rain.Rate);
			lblMonthly.Text = string.Format("{0:N2} in", cc.Rain.Monthly);
			lblYearly.Text = string.Format("{0:N2} in", cc.Rain.YearlyTotal);
			
			if (cc.Rain.Rate > 0)
				lblChange.Text = "&uarr;";
			else
				lblChange.Text = "&nbsp;";
		}
	}
}